/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.appleframework.web;

import org.appleframework.templates.Template;
import org.appleframework.templates.TemplateLoader;
import org.appleframework.web.results.RenderTemplate;

/**
 *
 * @author zhujg
 */
public abstract class ActionSupper {

  public static HttpRequest request = null;
  public static HttpResponse response = null;
  public static Params params = null;

  public static void render(Object... args) {
    String templateName = null;
    if (args.length > 0) {
      templateName = args[0].toString();
    }
    Template template = TemplateLoader.load(templateName);
    throw new RenderTemplate(template);
  }
}
